import 'package:flutter/material.dart';

class DkFixedCeilingHoveringSilverDelegate
    extends SliverPersistentHeaderDelegate {
  final double height;
  final WidgetBuilder widgetBuilder;

  DkFixedCeilingHoveringSilverDelegate(this.height, this.widgetBuilder);

  @override
  Widget build(
      BuildContext context, double shrinkOffset, bool overlapsContent) {
    return widgetBuilder(context);
  }

  @override
  double get maxExtent => height;

  @override
  double get minExtent => height;

  @override
  bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) {
    return true;
  }
}
